<!DOCTYPE html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport"
        content="width=device-width,initial-scale=1, maximum-scale=1, minimum-scale=1,user-scalable=no, minimal-ui">
    <meta http-equiv="x-dns-prefetch-control" content="on">
    <link rel="dns-prefetch" href="{:config('web_url_oss')}">
    <title>数字人</title>
    <link rel="stylesheet" href="{:config('web_url_oss')}/pc_paas_diy/ant-design-vue@1.7.3.css">
    <link rel="stylesheet" href="{:config('web_url_oss')}/pc_paas_diy/diy-pass-pc.css?v={:config('asset_version')}">



    <script src="{:config('web_url_oss')}/pc_paas_diy/diy-pass-pc.js?v={:config('asset_version')}"></script>
    <script src="{:config('web_url_oss')}/pc_paas_diy/html2canvas.min.js"></script>
    <link rel="stylesheet"
        href="{:config('web_url_oss')}/pc_paas_diy/library-ant-design-vue.css?v={:config('asset_version')}">

    <style>
        [v-cloak] {
            display: none !important;
        }

        .antdVue {
            position: relative;
            width: 100%;
            background: #F8F8F8;
        }

        .zoom_bg_color {
            background: #fff;
        }
    </style>
</head>

<body>
    <div id="antdVue" :style="themeColorInit(themeColorConfig)" style="width:100%; height:100%;">
        <div class="antdVue SPECIAL_EFFECT_FULL_SCREEN_WRAPPER" v-cloak>


            <input type="hidden" id="hidden_field_member_uid" value="{$user['uid']}">
            <input type="hidden" id="hidden_field_user_token" value="{$user['user_token']}">
            <input type="hidden" id="hidden_field_member_id" value="{$user['member_id']}">
            <input type="hidden" id="hidden_field_alias" value="{$alias}">
            <input type="hidden" id="hidden_field_aid" value="{$id}">
            <input type="hidden" id="hidden_field_roles" value="{$user['roles']}">
            <input type="hidden" id="web_url_oss" value="{:config('web_url_oss')}">







            <div class="flex benben-flex-layout  flex-wrap   w-100">
                <iframe src="https://shuziren.zhongbenjiaoyu.com" style="width:100%;height:100%"
                    frameborder="0"></iframe>
            </div>



        </div>
    </div>
</body>
<script src="{:config('web_url_oss')}/static/plugins/vue/vue.min.js?v={:config('asset_version')}"></script>
<script src="{:config('web_url_oss')}/static/plugins/jquery/jquery-3.7.1.min.js?v={:config('asset_version')}"></script>
<script src="{:config('web_url_oss')}/pc_paas_diy/moment@2.20.1.min.js"></script>
<script src="{:config('web_url_oss')}/pc_paas_diy/moment@2.20.1.zh-cn.js"></script>
<script src="{:config('web_url_oss')}/pc_paas_diy/ant-design-vue@1.7.3.min.js?v={:config('asset_version')}"></script>
<script src="{:config('web_url_oss')}/pc_paas_diy/vue-dash-event@1.0.1.js"></script>


<script src="{:config('web_url_oss')}/static/plugins/ajax/axios.js"></script>
<script src="{:config('web_url_oss')}/pc_paas_diy/u-charts.js"></script>
<script>

    const themeColorConfig = { "presetApi": { "getClassifyOne": "", "getClassifyTow": "", "getClassifyShop": "" }, "themeType": 0, "themeConfig": [{ "colorConfig": ["#333333", "#666666", "#999999", "#ffffff", "#0052c7", "#F02325", "#FC9C3A", "#4DC777", "#F2CC98", "#F2CC66"], "bgColorConfig": ["#EBEDF8", "#FFFFFF", "#0052c7", "#FC9C3A", "#FC9fff", "#E6F333", "#E6F1FE", "linear-gradient(301deg, #EBBA7B 0%, #F8D9AD 100%)", "linear-gradient(180deg, #F5588E 0%, #F0403C 100%)", "linear-gradient(179deg, #FFD033 0%, #F4890E 100%)"], "bdColorConfig": ["#EBEDF8", "#FFFFFF", "#0052c7", "#FC9C3A", "#333333", "#666666", "#999999", "#dddddd", "#1178F0", "#F02325"] }] };
    const { LocaleProvider, locales, message, Modal } = window.antd;
    Vue.prototype.$message = message
    Vue.use(window['vue-dash-event'])
    const ShowIframedrawer = Vue.extend(iframedrawer)
    iframedrawer.install = function (data) {
        let instance = new ShowIframedrawer({
            data
        }).$mount()
        document.body.appendChild(instance.$el)
        Vue.nextTick(() => { instance.show = true })
    }
    const ShowIframemodal = Vue.extend(iframemodal)
    iframemodal.install = function (data) {
        let instance = new ShowIframemodal({
            data
        }).$mount()
        document.body.appendChild(instance.$el)
        Vue.nextTick(() => { instance.show = true })
    }
    function getUrlKey(name) {
        let val = decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ''])[1].replace(/\+/g, '%20'))
        if (val) {
            return val
        } else {
            var url = location.href.split('/' + name + '/')
            if (url.length > 1) {
                var arr = url[1].split('.')[0].split('?')[0].split('/')
                if (arr.length) {
                    return isEmpty(arr[0]) ? null : arr[0]
                }
            }
            return null
        }
    }

    var user_token = $('#hidden_field_user_token').val();
    var public_headers = { 'user-token': user_token }

    var member_id = $('#hidden_field_member_id').val();
    var hidden_field_alias = $('#hidden_field_alias').val();
    var hidden_field_aid = $('#hidden_field_aid').val();
    var hidden_field_roles = $('#hidden_field_roles').val();
    var web_url_oss = $('#web_url_oss').val();



    const AD_MANGER = new Vue({
        el: '#antdVue',
        mixins: [],
        data() {
            receive(this);
            return { themeColorConfig, locale: locales[lang_to_antd[current_lang]], "viewSource": "PC" };
        },
        components: {},
        computed: {

        },
        created() {
            if (window.parent.document) {
                var themeColor
                if (window.parent.SAI_ZHU_GE_MAIN_VUE_APP) {
                    var style = window.parent.document.getElementsByTagName('style')
                    themeColor = window.parent.SAI_ZHU_GE_MAIN_VUE_APP.$store.getters.color
                    for (var i = 0; i < style.length; i++) {
                        var id = style[i].id
                        if (id && id.indexOf("css_") > -1) {
                            var styleEl = document.createElement('style');
                            styleEl.innerHTML = style[i].innerText;
                            document.head.appendChild(styleEl);
                        }
                    }
                } else {
                    var cookieData = window.parent.parent && window.parent.parent.document.cookie.split(";") || window.parent.document.cookie.split(";") || []
                    if (cookieData.length) {
                        for (var i = 0; i < cookieData.length; i++) {
                            var temp = cookieData[i].split("=");
                            if (temp[0] == "Huiskin") {
                                var colorObj = { orange: '#cb4400', default: themeColorConfig.themeConfig[0].colorConfig[4], black: "#222d32", blue: "#4e73df", purple: "#605ca8" }
                                themeColor = colorObj[temp[1]];
                            }

                        }
                    }
                }
                if (themeColor) {
                    var themeConfig = this.themeColorConfig.themeConfig
                    themeConfig[0].colorConfig[4] = themeColor
                    themeConfig[0].bgColorConfig[2] = themeColor
                    themeConfig[0].bdColorConfig[2] = themeColor
                    this.themeColorConfig.themeConfig = themeConfig
                    console.log(this.themeColorConfig, themeConfig)
                }

            }
            if (getUrlKey('viewSource')) { this.viewSource = getUrlKey('viewSource'); }
        },
        mounted() {


        },
        beforeDestroy() {

        },
        watch: {

        },
        methods: {
            isEmpty,
            lodopPrint() {
                document.querySelector('.btn').style.opacity = 0
                document.querySelector('.ant-pagination') && (document.querySelector('.ant-pagination').style.opacity = 0)
                html2canvas(document.querySelector("#antdVue")).then(canvas => {
                    let baseCode = canvas.toDataURL('image/png')
                    let idx = baseCode.indexOf('image/png;base64,')
                    baseCode = baseCode.substring(idx + 'image/png;base64,'.length)
                    let data = window.atob(baseCode)
                    let len = data.length
                    let arr = new Uint8Array(len)
                    for (let i = 0; i < len; ++i) {
                        arr[i] = data.charCodeAt(i)
                    }
                    let blob = new Blob([arr], { type: 'image/png' })
                    //创建文件的url
                    let blobURL = window.URL.createObjectURL(blob)
                    this.printerUrl = blobURL
                    document.querySelector('.btn').style.opacity = 1
                    document.querySelector('.ant-pagination') && (document.querySelector('.ant-pagination').style.opacity = 1)
                    //加载完成后打印
                    let iframe = document.getElementById('downloadFrame')
                    iframe.onload = function () {
                        iframe.focus()
                        iframe.contentWindow.print()
                    }
                });
            },

        }
    });
</script>